package com.aiyige.model.eshop;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zhuyakun on 2018/1/29.
 */

public class BuyerBackup implements Parcelable{
    String id;
    String name;
    String avatar;
    Integer level;
    String mobile;
    String address;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.name);
        dest.writeString(this.avatar);
        dest.writeValue(this.level);
        dest.writeString(this.mobile);
        dest.writeString(this.address);
    }

    public BuyerBackup() {
    }

    protected BuyerBackup(Parcel in) {
        this.id = in.readString();
        this.name = in.readString();
        this.avatar = in.readString();
        this.level = (Integer) in.readValue(Integer.class.getClassLoader());
        this.mobile = in.readString();
        this.address = in.readString();
    }

    public static final Creator<BuyerBackup> CREATOR = new Creator<BuyerBackup>() {
        @Override
        public BuyerBackup createFromParcel(Parcel source) {
            return new BuyerBackup(source);
        }

        @Override
        public BuyerBackup[] newArray(int size) {
            return new BuyerBackup[size];
        }
    };
}
